<%@ page contentType="text/html; charset=utf-8"  pageEncoding="utf-8"%>
<%@ page language="java"%>
<%@ include file="/common/taglibs.jsp"%>
<%@ include file="/common/meta.jsp"%>
<%@ include file="/common/common.jsp"%>
<s:hidden name="siteLogoPhysicalPath"/>
<s:hidden name="upType" id="lx"/>
<script type="text/javascript">
	$("input[name=siteLogoPhysicalPath]",parent.document).val($("input[name=siteLogoPhysicalPath]").val());
	$("input[name=siteLogoDbPath]",parent.document).val('<s:property value="siteLogoDbPath"/>');
	$("input[name=siteBannerDbPath]",parent.document).val('<s:property value="siteBannerDbPath"/>');
	var lx = $("#lx").val();
	$(function(){
		$.ajaxSetup({
			cache:false
		});
		if(lx == 1){
			$("#pictemp2",parent.document).attr("src",'<s:property value="uploadUrl"/><s:property value="siteLogoDbPath"/>');
			$("#pictemp2",parent.document).load(function(){
				$(".loading",parent.parent.document).remove();
				$(".shadow",parent.parent.document).remove();
			}).error(function() {
				if($("#pictemp2",parent.document).attr("src")=="justdoit.jpg") {
					setTimeout(function(){
						$("#pictemp2",parent.document).attr("src",'<s:property value="uploadUrl"/><s:property value="siteLogoDbPath"/>');
					},1000);
				}else {
					setTimeout(function(){
						$("#pictemp2",parent.document).attr("src",'justdoit.jpg');
					},1000);
				}
	        }) ;
		}else{
			$("#pictemp3",parent.document).attr("src",'<s:property value="uploadUrl"/><s:property value="siteBannerDbPath"/>');
			$("#pictemp3",parent.document).load(function(){
				$(".loading",parent.parent.document).remove();
				$(".shadow",parent.parent.document).remove();
			}).error(function() {
				if($("#pictemp3",parent.document).attr("src")=="justdoit.jpg") {
					setTimeout(function(){
						$("#pictemp3",parent.document).attr("src",'<s:property value="uploadUrl"/><s:property value="siteBannerDbPath"/>');
					},1000);
				}else {
					setTimeout(function(){
						$("#pictemp3",parent.document).attr("src",'justdoit.jpg');
					},1000);
				}
	        }) ;
		}
		
	});
</script>
